import {v4 as uuidv4} from 'uuid';
/*
* 生成一个随机字符串，且不能重重生成（只能生成一次）并且需要持久化存储
* */
export default function uuid() {
    let uuid = localStorage.getItem("uuid")
    if (!uuid) {
        uuid = uuidv4()
        localStorage.setItem("uuid", uuid)
    }
    return uuid
}
